%--------------------------------------------------------------------------
%
% computes the first derivative (wrt to eta = z / h) of the basic state
%
%--------------------------------------------------------------------------

function dvdn = comp_base_deriv(v, h, p)

dvdn = [0;
    (v(3:end) - v(1:end-2)) / 2 / p.dz;
    -h * p.delta * (1 - p.beta - v(p.N)) * (p.beta + v(p.N));
    ];